<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="edu.ynu.onlinesqltool.model.*"%>
<jsp:useBean id="table" scope="request" type="edu.ynu.onlinesqltool.model.Table"></jsp:useBean>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>Show table details page</title>

  </head>
  
  <body>
  <p>表名：<%=table.getName()%></p>
    各字段信息：<br>
  <table width="50%" border="1" cellspacing="0" bordercolor="#B8B8B8">
  <tr>
    <td width="25%">Field</td>
    <td width="25%">Type</td>
    <td width="15%">Null</td>
    <td width="15%">Key</td>
    <td width="15%">Default</td>
    <td width="30%">Extra</td>
  </tr>
  <%
  List fields=table.getFields();
  for(int i=0;i<fields.size();i++){
    Field field=(Field)fields.get(i);
  %>
  <tr>
    <td><%=field.getName() %>&nbsp;</td>
    <td><%=field.getType() %>&nbsp;</td>
    <td><%=field.getIsNull() %>&nbsp;</td>
    <td><%=field.getKey() %>&nbsp;</td>
    <td><%=field.getDefault() %>&nbsp;</td>
    <td><%=field.getExtra() %>&nbsp;</td>
  </tr>
  <%} %>
</table>
  </body>
</html>
